const router = require("../router");

router.post("/getConfiguredViews", async function (req, res) {
  res.json({
    success: true,
    msg: "成功",
    code: "0",
    data: {
      pageSize: 1,
      pageNum: 1,
      totalPages: 0,
      totalSize: 30,
      content: [
        {
          viewId: 246468,
          viewName: "1",
          state: -1,
          viewValue: null,
          viewCoverAddress: null,
        },
        {
          viewId: 236157,
          viewName: "名称测试1",
          state: -1,
          viewValue: null,
          viewCoverAddress: "gesp/template1.png",
        },
        {
          viewId: 271593,
          viewName: "最新1",
          state: -1,
          viewValue: null,
          viewCoverAddress: "gesp/template2.png",
        },
        {
          viewId: 158676,
          viewName: "KKKKKK",
          state: 1,
          viewValue: null,
          viewCoverAddress: "gesp/template1.png",
        },
        {
          viewId: 171258,
          viewName: "测试概览",
          state: 1,
          viewValue: null,
          viewCoverAddress: "gesp/template1.png",
        },
        {
          viewId: 281868,
          viewName: "质量监控",
          state: 1,
          viewValue: null,
          viewCoverAddress: "gesp/template4.png",
        },
      ],
    },
    exName: null,
    extInfo: null,
  });
});

router.post("/deleteConfiguredViews", async function (req, res) {});

router.post("/createViews", async function (req, res) {});

router.post("/getConfiguredViewsDetailInfo", async function (req, res) {
  res.json({
    success: true,
    msg: "成功",
    code: "0",
    data: {
      viewId: 246468,
      state: -1,
      viewName: "1",
      viewValue: null,
      viewCreateTime: "2024-06-27T11:23:08",
      viewCoverAddress: null,
      associatedUserInfo: {
        total: 0,
        list: null,
        pageNum: 0,
        pageSize: 0,
        size: 0,
        startRow: 0,
        endRow: 0,
        pages: 0,
        prePage: 0,
        nextPage: 0,
        isFirstPage: false,
        isLastPage: false,
        hasPreviousPage: false,
        hasNextPage: false,
        navigatePages: 0,
        navigatepageNums: null,
        navigateFirstPage: 0,
        navigateLastPage: 0,
      },
    },
    exName: null,
    extInfo: null,
  });
});

module.exports = router;
